package model;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

public class Table {

	private int id;
	
	@NotNull(message="表名不能为空！")
	@Size(min=1,max=100,message="表名长度应在1-100之间！")
	private String tableName;
	@Min(value=1,message="数据库名不能为空！")
	@NotNull(message="数据库名不能为空！")
	private int dbId;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getTableName() {
		return tableName;
	}
	public void setTableName(String tableName) {
		this.tableName = tableName;
	}
	public int getDbId() {
		return dbId;
	}
	public void setDbId(int dbId) {
		this.dbId = dbId;
	}
	public Table(int id, String tableName, int dbId) {
		super();
		this.id = id;
		this.tableName = tableName;
		this.dbId = dbId;
	}
	public Table() {
		super();
	}
	@Override
	public String toString() {
		return "Table [id=" + id + ", tableName=" + tableName + ", dbId="
				+ dbId + "]";
	}
	
}
